(function () {
    "use strict";

    function isPropertyAvailable(objectForCheck, propertyToCheck) {
        for (var prop in objectForCheck) {
            if (prop === propertyToCheck) {
                return true;
            }
        }

        return false;
    }

    var sampleObj = {
        firstProp: 5,
        secondProp: 'sampleString'
    };

    console.log(isPropertyAvailable(sampleObj, 'secondProp'));
    console.log(isPropertyAvailable(sampleObj, 'sampleString'));
}());